<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let url = 'https://cn.bing.com/search?q=%E5%93%94%E5%93%A9%E5%93%94%E5%93%A9&gs_lcrp=EgRlZGdlKgcIABBFGMIDMgcIABBFGMIDMgcIARBFGMIDMgcIAhBFGMIDMgcIAxBFGMIDMgcIBBBFGMIDMgcIBRBFGMIDMgcIBhBFGMIDMgcIBxBFGMID0gENMTc5NDk0NTM2ajBqMagCCLACAQ&FORM=ANNTA1&PC=ASTS'
        function resolveUrl(url)
        {
            let result = {};
            let index = url.indexOf('?');
            if(index == -1)
            {
                return result;
            }

            let params = url.slice(index+1).split('&')
            params.forEach(item=>{
                const [key,value] = item.split('=');
                result[decodeURIComponent(key)] = decodeURIComponent(value);
            })
            return result;
        }
        console.log(resolveUrl(url));
    </script>
</body>
</html>